package com.edais.service;

import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import java.util.Map;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.edais.domain.BannerConfigTab;
import com.edais.domain.UserActivityKeyCode;
import com.edais.domain.UserLDActivityInfo;
import com.yunzhi.domain.ResultDTO;

@Service

public interface ActivityService {
	
	/**
	 * 获取app版本信息
	 * @param params
	 * @return
	 */
	public ResultDTO getAppVersionInfo(Map<String, String> params);
	

	/**
	 * 获取手机banner列表
	 * @param params 
	 * @param map
	 * @return
	 * @throws Exception 
	 */
	public List<BannerConfigTab> getBannerList(Map<String, Object> params) throws Exception;
	
	/**
	 * 获取手机第二个banner列表
	 * @param map
	 * @return
	 * @throws Exception 
	 */
	public List<Map<String, String>> getBannerListSEC() throws Exception;
	
	/**
	 * 获取参数
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public String findParamValueByName(String key) throws Exception;
	
	/**
	 * 根据参数获取 K码一览表数据
	 * @param kCode
	 * @return
	 * @throws Exception
	 */
	public List<UserActivityKeyCode> findKeyCodeListByParm(Map<String, Object> map) throws Exception;
	
	/**
	 * 获取k码使用数据
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public List<UserLDActivityInfo> findActivityInfoByParm(Map<String, Object> map) throws Exception;
	
	/**
	 * 保存用户o2o铃铛活动信息
	 * @param keycodeUse
	 * @throws Exception
	 */
	public void addActivityInfo(UserLDActivityInfo activityInfo) throws Exception;


	/**
	 * 更新用户活动信息
	 * @param activityInfo
	 * @throws Exception
	 */
	public void updateActivityInfo(UserLDActivityInfo activityInfo) throws Exception;

	/**
	 * 活动赠送理财
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> activityBidByBalance(String logInfo, Map<String, Object> map) throws Exception;
	
	
	/**
	 * 获取活动用标信息
	 * @return
	 * @throws Exception
	 */
	public Map<String, Object> findActivityBidInfo() throws Exception;

	/**
	 * @Description: 查询我的账户详情信息
	 */
	public String queryMyAccountDetail(Map<String,String> map) throws Exception;
	/**
	 * 查询K码是否存在数据库
	 */
	public Map<String,Object> checkKCodeByCardNo(Map<String,Object> map)throws Exception;
	/**
	 * 根据Kcode查询理财信息
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> queryReturnFinanceInfoByKCode(Map<String,Object> map)throws Exception;
	
	public Map<String,Object>  sendKeyCode(Map<String,String> map)throws Exception;
	
	/**
	 * 通过订单号更新订单信息
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> updateOrderStateByOrderId(Map<String,Object> map)throws Exception;
	
	/**
	 * 通过订单号更新订单信息
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public void updateActivityInfoIsValid(UserLDActivityInfo activityInfo)throws Exception;
	
	/**
	 * 上传图片
	 * @throws Exception
	 */
	public String modifyPic(Map<String, Object> map) throws Exception;
	
	
	/**
	 * 根据条件更新活动历史记录表
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int updateActivityHistoryInfoByParm(Map<String,Object> map)throws Exception;

	/**
	 * 增加活动历史记录
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public void addActivityHistoryInfo(Map<String,Object> map)throws Exception;

	/**
	 * 查询活动历史记录
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> queryActivityHistoryInfoByParm(Map<String,Object> map)throws Exception;
	
	
	/**
	 * 通过订单号冻结该订单
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> frozenOrderByOrderId(Map<String,Object> map)throws Exception;
	
	/**
	 * 记录卡号与型号的绑定关系
	 * @param map
	 * @return
	 * @throws Exception
	 */
//	public Map<String,Object> addCardNoAndModelInfo(Map<String,String> map)throws Exception;

	/**
	 * 根据卡号预冻结（未激活时）
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> upFrozenByCardNo(Map<String,Object> map)throws Exception;
	
	/**
	 * 根据卡号解冻（未激活时）
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public Map<String,Object> upFrozenCancelByCardNo(Map<String,Object> map)throws Exception;


	/**
	 * 活动列表查询接口
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public ResultDTO<BannerConfigTab> getAcList(Map<String, Object> map)throws Exception;

	/**
	 * 根据卡号查询用户活动K码一览表
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public UserActivityKeyCode queryUserActivityKeyCodeByCardNo(Map<String, Object> map)throws Exception;
	
	/**
	* 添加微商推送数据
	* @param  userActivityKeyCode
	* @return void   
	* @throws Exception
	 */
	public void addWbActivityKeyCodeData(Map<String, Object> map)throws SQLIntegrityConstraintViolationException,Exception;
	
	public Map<String, Object> sendVoucher(Map<String, Object> parammap,Map<String, Object> map)throws Exception;
	
	/***
	 * 
	 * @Description: 添加当前k码记录
	 * @param @param map
	 * @param @throws Exception   
	 * @return void  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-3
	 */
//	public void addKeycodeRecord(Map<String, Object> map)throws Exception;
	
	/**
	 * 
	 * @Description: 查询当前k码记录
	 * @param @param map
	 * @param @return
	 * @param @throws Exception   
	 * @return int  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-3
	 */
//	public Map<String,Object> queryKeyCodeBykc(Map<String, Object> map)throws Exception;
	
	/**
	 * 
	 * @Description: 修改k码状态
	 * @param @param map
	 * @param @throws Exception   
	 * @return void  
	 * @throws
	 * @author wuhan
	 * @date 2016-8-3
	 */
//	public void updateKeyCodeRecordState(Map<String, Object> map)throws Exception;
	
	/**
	 * @param logInfo
	 * @param map
	 * @return
	 * @throws Exception 
	 */
	Map<String, Object> kcodeGiftSend(String logInfo, Map<String, Object> map) throws Exception;
}
